package com.eschool.controller;


import com.eschool.pojo.ClassRoomDAO;
import com.eschool.pojo.FindRoomDTO;
import com.eschool.pojo.ServerResult;
import com.eschool.service.RoomService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@Configuration
public class RoomController {
    @Autowired
    RoomService roomService;

    @RequestMapping("/room/findRoom")
    public ServerResult findRoom(FindRoomDTO findRoomDTO){
        List<ClassRoomDAO> classRoomDAOS = roomService.FindRoom(findRoomDTO);
        return new  ServerResult(0,"success",classRoomDAOS);
    }
}
